package com.firefly.admin.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.firefly.admin.common.vo.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.List;

@ApiModel(value = "FySystemMenu", description = "系统菜单信息")
@Data
@ToString
@EqualsAndHashCode(callSuper = false)
public class FySystemMenu extends BaseEntity {

    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "菜单ID")
    private Long menuId;

    @ApiModelProperty(value = "父节点ID")
    private Long parentId;

    @ApiModelProperty(value = "菜单类型", notes = "1：菜单2：按钮")
    private String menuType;

    @ApiModelProperty(value = "菜单名称")
    private String menuName;

    @ApiModelProperty(value = "菜单路径")
    private String menuPath;

    @ApiModelProperty(value = "菜单编码")
    private String menuCode;

    @ApiModelProperty(value = "菜单图标")
    private String menuIcon;

    @ApiModelProperty(value = "菜单状态", notes = "0：启用1：停用")
    private String menuStatus;

    @ApiModelProperty(value = "排序")
    private Float sort;

    @ApiModelProperty(value = "子菜单", hidden = true)
    @TableField(exist = false)
    private List<FySystemMenu> children;

    @ApiModelProperty(value = "父菜单", hidden = true)
    @TableField(exist = false)
    private FySystemMenu parent;
}
